package gite.nouette.performance.scenarii

import io.gatling.core.Predef._
import io.gatling.http.Predef._
import scala.concurrent.duration._
import bootstrap._

object GiteNouetteScenario {

  def scn(lang: String): io.gatling.core.structure.ScenarioBuilder = {
    return scenario("Gîte Nouette")
      .exec(
      http("root")
        .get("/"))
      .pause(0 milliseconds, 100 milliseconds)
      .group(lang) {
      exec(
        http("accueil")
          .get(lang))
        .pause(0 milliseconds, 100 milliseconds)
        .exec(
        http("gite")
          .get(lang + "/gite"))
        .pause(0 milliseconds, 100 milliseconds)
        .exec(
        http("environnement")
          .get(lang + "/environnement"))
        .pause(0 milliseconds, 100 milliseconds)
        .exec(
        http("localisation")
          .get(lang + "/localisation"))
        .pause(0 milliseconds, 100 milliseconds)
        .exec(
        http("tarifs")
          .get(lang + "/tarifs"))
        .pause(0 milliseconds, 100 milliseconds)
        .exec(
        http("reservation")
          .get(lang + "/reservation"))
        .pause(0 milliseconds, 100 milliseconds)
        .exec(
        http("contact")
          .get(lang + "/contact"))
        .pause(0 milliseconds, 100 milliseconds)
        .group("plus") {
        exec(
          http("photos")
            .get(lang + "/photos"))
          .pause(0 milliseconds, 100 milliseconds)
          .group("photos") {
          exec(
            http("pre-en-pail")
              .get(lang + "/photos/pre-en-pail"))
            .pause(0 milliseconds, 100 milliseconds)
            .exec(
            http("gite")
              .get(lang + "/photos/gite"))
            .pause(0 milliseconds, 100 milliseconds)
            .exec(
            http("averton")
              .get(lang + "/photos/averton"))
            .pause(0 milliseconds, 100 milliseconds)
            .exec(
            http("randonnees")
              .get(lang + "/photos/randonnees"))
            .pause(0 milliseconds, 100 milliseconds)
        }
          .exec(
          http("liens")
            .get(lang + "/liens"))
          .pause(0 milliseconds, 100 milliseconds)
          .exec(
          http("plan")
            .get(lang + "/plan"))
          .pause(0 milliseconds, 100 milliseconds)
      }
    }
  }
}
